<script setup>
// import ModelList from '../components/ModelList.vue'
import { inject } from 'vue'
const models = inject('models')
</script>

<template>
  <main>
    <el-table :data="models" border style="width: 100%" >
      <el-table-column prop="name" label="名称" >
        <template #default="scope">
          <el-link :href="'models/'+scope.row.name">
            {{scope.row.name }}
          </el-link>
        </template>
      </el-table-column>
      <el-table-column prop="details.format" label="格式" />
      <el-table-column prop="details.family" label="基础模型" />
      <el-table-column prop="details.parameter_size" label="参数" />
      <el-table-column prop="details.quantization_level" label="量化" />
      <el-table-column prop="modified_at" label="最后修改">
        <template #default="scope">
          {{ new Date(scope.row.modified_at).format('yyyy-MM-dd hh:mm:ss') }}
        </template>
      </el-table-column>
      

    </el-table>
  </main>
</template>
